package org.sbbs.app.demo.model;
/**
  org.sbbs.app.demo.model.DemoSysDbLog
 */
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.sbbs.base.model.BaseObject;

/**
 * @author Administrator
 */
@Entity
@Table( name = "t_demo_syslog" )
public class DemoSysDbLog extends BaseObject{
    /**
     * 
     */
    private static final long serialVersionUID = 5966415593642727205L;

    private Long logId;

    private String logMsg;

    private String operator;

    private Date logTime;

    @Id
    @GeneratedValue( strategy = GenerationType.AUTO )
    public Long getLogId() {
        return logId;
    }

    public void setLogId( Long logId ) {
        this.logId = logId;
    }

    @Column( name = "logMsg", length = 500, nullable = false )
    public String getLogMsg() {
        return logMsg;
    }

    public void setLogMsg( String logMsg ) {
        this.logMsg = logMsg;
    }

    @Column( name = "operator", length = 50, nullable = false )
    public String getOperator() {
        return operator;
    }

    public void setOperator( String operator ) {
        this.operator = operator;
    }

    @Temporal( TemporalType.TIMESTAMP )
    @Column( name = "logTime", length = 19, nullable = false )
    public Date getLogTime() {
        return logTime;
    }

    /**
     * @param logTime
     */
    public void setLogTime( Date logTime ) {
        this.logTime = logTime;
    }

    @Override
    public String toString() {
        return "DemoSysDbLog [logId=" + logId + ", logMsg=" + logMsg + ", operator=" + operator + ", logTime=" + logTime + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ( ( logId == null ) ? 0 : logId.hashCode() );
        result = prime * result + ( ( logMsg == null ) ? 0 : logMsg.hashCode() );
        result = prime * result + ( ( logTime == null ) ? 0 : logTime.hashCode() );
        result = prime * result + ( ( operator == null ) ? 0 : operator.hashCode() );
        return result;
    }

    @Override
    public boolean equals( Object obj ) {
        if ( this == obj )
            return true;
        if ( obj == null )
            return false;
        if ( getClass() != obj.getClass() )
            return false;
        DemoSysDbLog other = (DemoSysDbLog) obj;
        if ( logId == null ) {
            if ( other.logId != null )
                return false;
        }
        else if ( !logId.equals( other.logId ) )
            return false;
        if ( logMsg == null ) {
            if ( other.logMsg != null )
                return false;
        }
        else if ( !logMsg.equals( other.logMsg ) )
            return false;
        if ( logTime == null ) {
            if ( other.logTime != null )
                return false;
        }
        else if ( !logTime.equals( other.logTime ) )
            return false;
        if ( operator == null ) {
            if ( other.operator != null )
                return false;
        }
        else if ( !operator.equals( other.operator ) )
            return false;
        return true;
    }

}
